---
layout: "default"
title: "Operator: prefix -"
description: "Swift documentation for the 'prefix -' operator."
root: "/v3.1"
---

<code class="language-swift"> operator prefix - {
    associativity 
    precedence 
}</code>

<h3>Declarations</h3>

<div class="declaration" id="func-mns_-double">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns_-double">prefix func -(<wbr>_: Double)</a>
        
<div class="comment collapse" id="comment-func-mns_-double"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -(x: Double) -&gt; Double</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mns_-float">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns_-float">prefix func -(<wbr>_: Float)</a>
        
<div class="comment collapse" id="comment-func-mns_-float"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -(x: Float) -&gt; Float</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mns_-float80">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns_-float80">prefix func -(<wbr>_: Float80)</a>
        
<div class="comment collapse" id="comment-func-mns_-float80"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -(x: Float80) -&gt; Float80</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mns-t-where-t_-floatingpoint_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns-t-where-t_-floatingpoint_-t">prefix func <wbr>- &lt;T where T : FloatingPoint&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-mns-t-where-t_-floatingpoint_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -&lt;T where T : FloatingPoint&gt;(x: T) -&gt; T</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mns-t-where-t_-signedarithmetic_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns-t-where-t_-signedarithmetic_-t">prefix func <wbr>- &lt;T where T : SignedArithmetic&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-mns-t-where-t_-signedarithmetic_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -&lt;T where T : SignedArithmetic&gt;(x: T) -&gt; T</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mns-t-where-t_-signednumber_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mns-t-where-t_-signednumber_-t">prefix func <wbr>- &lt;T where T : SignedNumber&gt;(<wbr>_: T)</a>
        
<div class="comment collapse" id="comment-func-mns-t-where-t_-signednumber_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func -&lt;T where T : SignedNumber&gt;(x: T) -&gt; T</code>
    
    
</div></div>
</div>
